Skip to content

Conversation

@Guikingone
Copy link
Contributor

@Guikingone Guikingone commented Dec 12, 2025

Q A
Bug fix? yes
New feature? yes
Docs? yes
Issues #939
License MIT

@Guikingone Guikingone changed the title [Platform] Add token usage for Ollama [Platform] Add token usage for Ollama and CachedPlatform Dec 12, 2025
@OskarStark
Copy link
Contributor

Wait for #1125

@Guikingone Guikingone changed the title [Platform] Add token usage for Ollama and CachedPlatform [Platform] Add token usage extractor for Ollama Dec 15, 2025
@OskarStark
Copy link
Contributor

#1125 is now merged

@Guikingone
Copy link
Contributor Author

Yes, need to finish the tests and ensure that stream implementation is correct, should be done tomorrow 🙂

@Guikingone Guikingone force-pushed the refactor/token_usage branch 2 times, most recently from 0cfefc5 to 7e7903b Compare December 16, 2025 17:03
@Guikingone Guikingone marked this pull request as ready for review December 16, 2025 17:08
@carsonbot carsonbot added Bug Something isn't working Feature New feature Platform Issues & PRs about the AI Platform component Status: Needs Review labels Dec 16, 2025
@Guikingone
Copy link
Contributor Author

The CachedPlatform improvements are extracted to #1157

OskarStark added a commit that referenced this pull request Dec 16, 2025
This PR was squashed before being merged into the main branch.

Discussion
----------

[Platform] Improvements on `CachedPlatform`

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Docs?         | yes
| Issues        | Extracted from #1122
| License       | MIT

Summary:

- Add `MonotonicClock` as the default implementation for `ClockInterface` argument in `CachedPlatform` to ease tests and improve precision instead of `DatetimeImmutable()`
- Add an alias for `CachedPlatform`
- Add missing `.` in the `name` tag of `CachedPlatform` definition
- Improvements on tests for arguments / tags

Commits
-------

149ff59 [Platform] Improvements on `CachedPlatform`
@OskarStark
Copy link
Contributor

Can you please add an example script? thanks

@Guikingone
Copy link
Contributor Author

@OskarStark Done, both for streaming and non-streaming calls

@OskarStark
Copy link
Contributor

Thank you @Guikingone.

@OskarStark OskarStark merged commit 41703c5 into symfony:main Dec 17, 2025
239 checks passed
@Guikingone Guikingone deleted the refactor/token_usage branch January 8, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Feature New feature Platform Issues & PRs about the AI Platform component Status: Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants